reset 
set data style lines  
set nokey
set xrange [0:30]
set xtics 1
set yrange [0:8]
set ytics 1
set grid
S0(x) = 3 + (0.785704)*(x - (1)) + (0)*(x - (1))**2 + (-0.0857044)*(x - (1))**3
S1(x) = 3.7 + (0.528591)*(x - (2)) + (-0.257113)*(x - (2))**2 + (0.0343795)*(x - (2))**3
S2(x) = 3.9 + (-0.0858425)*(x - (5)) + (0.052302)*(x - (5))**2 + (0.33354)*(x - (5))**3
S3(x) = 4.2 + (1.01938)*(x - (6)) + (1.05292)*(x - (6))**2 + (-0.572306)*(x - (6))**3
S4(x) = 5.7 + (1.40831)*(x - (7)) + (-0.663996)*(x - (7))**2 + (0.155685)*(x - (7))**3
S5(x) = 6.6 + (0.547374)*(x - (8)) + (-0.19694)*(x - (8))**2 + (0.0241266)*(x - (8))**3
S6(x) = 7.1 + (0.0491321)*(x - (10)) + (-0.0521807)*(x - (10))**2 + (-0.00288039)*(x - (10))**3
S7(x) = 6.7 + (-0.341722)*(x - (13)) + (-0.0781041)*(x - (13))**2 + (0.00650868)*(x - (13))**3
Sp0(x) = ( x >= 0.9 && x <= 2.1) ? S0(x) : 0/0
Sp1(x) = ( x >= 1.9 && x <= 5.1) ? S1(x) : 0/0
Sp2(x) = ( x >= 4.9 && x <= 6.1) ? S2(x) : 0/0
Sp3(x) = ( x >= 5.9 && x <= 7.1) ? S3(x) : 0/0
Sp4(x) = ( x >= 6.9 && x <= 8.1) ? S4(x) : 0/0
Sp5(x) = ( x >= 7.9 && x <= 10.1) ? S5(x) : 0/0
Sp6(x) = ( x >= 9.9 && x <= 13.1) ? S6(x) : 0/0
Sp7(x) = ( x >= 12.9 && x <= 17.1) ? S7(x) : 0/0
plot 'pontos.txt' using 1:2 t 'pontos' with points pt(7) lt(8)
replot Sp0(x)
replot Sp1(x)
replot Sp2(x)
replot Sp3(x)
replot Sp4(x)
replot Sp5(x)
replot Sp6(x)
replot Sp7(x)
pause -1  
set out 'splineCubicaMono.eps' 
set term post mono 'Times-Roman' 18 
replot